<?php
namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class VipPurchaseResource extends JsonResource
{
	public function toArray($request)
	{
		$data = $this->resource;
		
		return [
			'id' => (int)$data->id,
			'user_id' => (int)$data->user_id,
			'total_amount' => $data->total_amount,
			'number' => (string)$data->number,
			'is_paid' => $data->isPaid(),
			'created_at' => (string)$data->created_at,
		];
	}
}
